﻿<Window x:Class="InstallerGUI2.MainWindow"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        Title="MainWindow" Height="350" Width="525" WindowStyle="ToolWindow" Loaded="Window_Loaded">
    <Grid Background="Black">
        <ScrollViewer VerticalAlignment="Stretch" HorizontalScrollBarVisibility="Hidden" x:Name="scwBackground">
            <ItemsControl x:Name="lbMsgs" ItemsSource="{Binding}" Margin="0,10,0,0">
                <ItemsControl.ItemTemplate>
                    <DataTemplate>
                        <TextBlock Text="{Binding}" Foreground="#FF807600"></TextBlock>
                    </DataTemplate>
                </ItemsControl.ItemTemplate>
            </ItemsControl>
        </ScrollViewer>
        <Grid Width="1"
              Height="1" x:Name="animGrid" Visibility="Collapsed">

            <Grid.RenderTransform>
                <TransformGroup>

                    <RotateTransform x:Name="angle" Angle="0" CenterX="0.5" CenterY="0.5" />

                    <!--
                        Ideally remove the translation and scale from here
                        and let the container apply them instead
                    -->

                    <TranslateTransform X="-0.5" Y="-0.5" />
                    <ScaleTransform ScaleX="200"
                                    ScaleY="200" />

                </TransformGroup>
            </Grid.RenderTransform>

            <Grid.Triggers>
                <EventTrigger RoutedEvent="Grid.Loaded">
                    <BeginStoryboard>
                        <Storyboard x:Name="rotation">
                            <DoubleAnimation Duration="0:0:1"
                                             Storyboard.TargetName="content"
                                             Storyboard.TargetProperty="Opacity"
                                             To="1" />
                            <DoubleAnimation Duration="0:0:2"
                                             From="0"
                                             RepeatBehavior="Forever"
                                             Storyboard.TargetName="angle"
                                             Storyboard.TargetProperty="Angle"
                                             To="359" />
                        </Storyboard>
                    </BeginStoryboard>
                </EventTrigger>
            </Grid.Triggers>

            <Canvas Name="content"
                    Opacity="0">

                <Path Width="1"
                      Height="1"
                      Stretch="Fill"
                      Stroke="Green"
                      StrokeStartLineCap="Round"
                      StrokeThickness="0.07">
                    <Path.Data>
                        <PathGeometry>
                            <PathFigure StartPoint="1,0">
                                <ArcSegment IsLargeArc="True"
                                            Point="0,-1"
                                            RotationAngle="90"
                                            Size="1,1"
                                            SweepDirection="Clockwise" />
                            </PathFigure>
                        </PathGeometry>
                    </Path.Data>
                </Path>

                <Path Canvas.Left="0.49"
                      Canvas.Top="-0.05"
                      Width="0.2"
                      Height="0.2"
                      Fill="Green"
                      Stretch="Fill">
                    <Path.Data>
                        <PathGeometry>
                            <PathFigure StartPoint="0,-1.1">
                                <LineSegment Point="0.1,-1" />
                                <LineSegment Point="0,-0.9" />
                            </PathFigure>
                        </PathGeometry>
                    </Path.Data>
                </Path>

            </Canvas>

        </Grid>
        <TextBlock x:Name="tbInstallUninstall"  Foreground="White" VerticalAlignment="Center" HorizontalAlignment="Center" FontSize="18" FontWeight="Bold"></TextBlock>
        <Button Background="Transparent" x:Name="btnStart" Click="btnStart_Click" VerticalAlignment="Center" HorizontalAlignment="Center" >
            <TextBlock  Foreground="White" VerticalAlignment="Center" HorizontalAlignment="Center" FontSize="18" FontWeight="Bold"> Start</TextBlock>
        </Button>
    </Grid>
</Window>
